package cn.xorange.commons.system.entity.system;

import cn.xorange.commons.data.annotation.MColumn;
import cn.xorange.commons.data.annotation.MTable;
import cn.xorange.commons.data.constants.KeyType;
import cn.xorange.commons.data.core.entity.TreeEntity;
import com.alibaba.fastjson2.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * @author : yangjian
 * @date : 2022/2/3
 */
@Data
@MTable(logicDel = true)
@EqualsAndHashCode(callSuper = true)
public class SysOrg extends TreeEntity {

    /**
     * 关联表
     */
    @MColumn(key = KeyType.AUTO)
    private Long orgId;
    @MColumn()
    private String orgName;

    private String parentName;
    @MColumn()
    private Long tenantId;
    @MColumn()
    private String leader;
    @MColumn()
    private String phone;
    @MColumn()
    private String email;
    @MColumn()
    private String address;
    @MColumn()
    private Integer sort;
    @MColumn()
    private String status;

    @MColumn(canNull = true)
    private String remark;

    @JsonIgnore
    @JSONField(serialize = false)
    private String type;
}
